import { reactive, ref, onMounted, onUnmounted } from 'vue';
import { socket } from '../../webFactory/src/utils/WebSocketClient'
//滑油系统图片
const imgurl = reactive({
	// 驱动端水平列表
	 about_img:'public/images/about.png',
	 water_img: 'public/images/water.png',
	 air_img:'public/images/air.png',
	 fuel_img:'public/images/fuel.png',
});

// 数据更新时间
const dataUpdateTime = '219/04/17 08:30:00'


// 底部彩虹条
const rainbow = ref([10, 20, 15, 20, 20, 15]);


// socket信息
//const socketMessage = ref('')

// Socket对象
let scoket = null;
socket.init()
// const initSocket = () => {
// 	// let num = -parseInt(Math.random()* 60)+100000;
// 	// let ip = window.SYSTEM_CONFIG.websocketIp+num || "" ;
// 	// if (!ip) return;

// 	// scoket = new Scoket(ip, (event) => {
// 	// 	// console.log(event,"------event------");
// 	// 	let data = event.data;
// 	// 	if (data == "ping") {
// 	// 		return;
// 	// 	}
// 	// 	console.log(event,"------event------"+socketMessage.value);
// 	// 	socketMessage.value = data;
// 	// });
// 	// // 发起连接

// }
const initData = () => {
	return {
		dataUpdateTime,
		rainbow,
		imgurl,
		socket
	}
}
export default initData;
